﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Business;
using System.Collections;

namespace BVVD_Website
{
    public partial class frmLogin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogin_Click(object sender, EventArgs e)
        {
            BVVDDataStore<LST_NSD> db = new BVVDDataStore<LST_NSD>();
            Hashtable condition = new Hashtable();
            condition.Add("MANSD",txtUsername.Value);
            //condition.Add("","");
            if (db.getFromDB(condition).Count > 0)
            {
                Page.Response.Redirect("HomePage.aspx");
            }
            else {
                rnAlert.Text = "Thông tin đăng nhập không chính xác ";
                    rnAlert.Show();
                
            }
        }
    }
}